home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Text Editor / Source / TextEditorSettingsExt.xh < prev    next >
Encoding:
Text File  |  1995-12-13  |  3.3 KB  |  145 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Delta Quadrant:Source:OD:SampleCode:SOMTextEditor:Source:TextEditorSettingsExt.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Implementation Types
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_TextEditorSettingsExt_xh
  18. #define SOM_TextEditorSettingsExt_xh
  19.  
  20. class TextEditorSettingsExt;
  21.  
  22. #define TextEditorSettingsExt_MajorVersion 1
  23. #define TextEditorSettingsExt_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODSettingsExtension_xh
  31. #include <Settings.xh>
  32. #endif
  33.  
  34. #ifndef TextEditorSettingsExt_API
  35. #define TextEditorSettingsExt_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODRefCntObject;
  50. class ODSettingsExtension;
  51. class ODPart;
  52.  
  53. /*
  54.  * End of user-defined types.
  55.  */
  56.  
  57. #ifdef OLDIBMSOMAPISUPPORT
  58. #define TextEditorSettingsExtCClassData TextEditorSettingsExtClassData
  59. #define TextEditorSettingsExtNewClass(major,minor) somNewVersionedClassReference(TextEditorSettingsExt,major,minor)
  60. #endif
  61.  
  62. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  63. #define TextEditorSettingsExtMetaClass SOMClass
  64.  
  65.  
  66. /* The API to the TextEditorSettingsExt class object, and the methods it introduces. */
  67. SOMEXTERN struct TextEditorSettingsExtClassDataStructure {
  68. #ifdef OLDIBMSOMAPISUPPORT
  69.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  70. #else
  71.     long zero;
  72. #endif
  73.     somStaticClassInfo *sci;
  74.     somDToken        instanceDataToken;
  75.     long reserved [3];
  76. } SOMDLINK TextEditorSettingsExtClassData;
  77.  
  78. #if !defined(TextEditorSettingsExt_Class_Source) && !defined(SOM_Module_texteditorsettingsext_Source)
  79. #if PRAGMA_IMPORT_SUPPORTED
  80. #pragma import list TextEditorSettingsExtClassData
  81. #endif
  82. #endif
  83.  
  84.  
  85. /*
  86.  * -- Typedefs and inline method declarations for left path inherited methods
  87.  * -- are omitted because this compilation had -museinheritedmethods in effect
  88.  */
  89.  
  90.  
  91. /*
  92.  * -- Typedefs for TextEditorSettingsExt Method Procedures
  93.  */
  94. SOMEXTERN {
  95. }
  96.  
  97. #endif /* TextEditorSettingsExt_API */
  98.  
  99.  
  100. /*
  101.  * -- This emitter treats Method Tokens as Thunks by default.
  102.  * -- Use the sc modifier "nothunks" to change this default
  103.  */
  104. #undef somresolve_
  105. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  106.  
  107. /*
  108.  * -- The C++ Wrapper Class for TextEditorSettingsExt
  109.  */
  110. class TextEditorSettingsExt : public ODSettingsExtension
  111. {
  112. public:
  113.  
  114. // TextEditorSettingsExt::new registers use of the class object, and then uses somNew
  115. // to allocate memory and load the object method table pointer. 
  116. void *operator new(size_t size)
  117. {
  118.     SOM_IgnoreWarning(size);
  119.     // Allocate memory using the default allocator for TextEditorSettingsExt, and
  120.     // clear mem & set method table pointer, call basic initialization
  121. #ifdef SOMCHKNULL
  122.     void * __somResult = (void *)
  123.       somNewObject(TextEditorSettingsExt);
  124.     SOMCHKNULL(__somResult);
  125.     return __somResult;
  126. #else
  127.     return (void*) somNewObject(TextEditorSettingsExt);
  128. #endif
  129. }
  130.  
  131. // TextEditorSettingsExt::delete uses the default deallocator for the object's class.
  132. void operator delete(void * obj)
  133. {
  134.     if (obj) {
  135.         SOM_Resolve(obj,SOMObject,somFree)
  136.            ( (SOMObject*) obj );
  137.     }
  138. }
  139.  
  140. };   /* TextEditorSettingsExt */
  141.  
  142.  
  143.  
  144. #endif       /* SOM_TextEditorSettingsExt_xh */
  145.